
DEBUGFLAGS=-g -pg

all: debug diameter mkshmgraph loadshmgraph graph2binary

debug: diameter.c visit.c graph.c graph.h visit.h methods.c methods.h
	gcc -Wall $(DEBUGFLAGS) $(SHMFLAGS) $(DEFINES) diameter.c visit.c graph.c methods.c -o debug


diameter: diameter.c visit.c graph.c graph.h visit.h methods.c methods.h
	gcc -Wall -O3 $(OPTFLAGS) $(SHMFLAGS) $(DEFINES) diameter.c visit.c graph.c methods.c -o diameter


mkshmgraph: mkshmgraph.c graph.c graph.h
	gcc -Wall -O3 $(OPTFLAGS) $(SHMFLAGS) mkshmgraph.c graph.c -o mkshmgraph

loadshmgraph: loadshmgraph.c
	gcc -Wall -O3 $(OPTFLAGS) $(SHMFLAGS) loadshmgraph.c -o loadshmgraph

graph2binary: graph2binary.c
	gcc -Wall -O3 $(OPTFLAGS) graph2binary.c -o graph2binary

clean: 
	rm -f *~ core gmon.out diameter debug loadshmgraph mkshmgraph graph2binary

distclean: clean
	rm -f Makefile
